package com.fowo.api.model.receivable.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fowo.api.common.validator.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 应收单子表 预览导入辅助模型(全字段为文本类型)
 * @author yl_ls
 */
@Getter
@Setter
public class ReceivableProductImportPo {

  /** 所属应收单 */
  @ExcelProperty("所属应收单")
  @Size(max = 50, message = "所属应收单长度不能超过50")
  private String parentIdAccountType;

  @ExcelIgnore
  @Schema(title = "所属应收单")
  private String parentId;

  /** 物料编码 */
  @ExcelProperty("物料编码")
  @Size(max = 500, message = "物料编码长度不能超过500")
  private String productCodeName;

  @ExcelIgnore
  @Schema(title = "物料编码")
  private String productCode;

  /** SKU */
  @ExcelProperty("SKU")
  @Size(max = 50, message = "SKU长度不能超过50")
  private String productSku;

  /** 物料名称 */
  @ExcelProperty("物料名称")
  @Size(max = 50, message = "物料名称长度不能超过50")
  private String productName;

  /** 计价单位 */
  @ExcelProperty("计价单位")
  private String unit;

  /** 计价数量 */
  @ExcelProperty("计价数量")
  @IntegerString(message = "计价数量数值格式不正确", label = "计价数量")
  private String num;

  /** 单价 */
  @ExcelProperty("单价")
  @DecimalString(message = "单价小数格式不正确", label = "单价")
  private String price;

  /** 主材料单价 */
  @ExcelProperty("主材料单价")
  @DecimalString(message = "主材料单价小数格式不正确", label = "主材料单价")
  private String mainUnitPrice;

  /** 主材料克重 */
  @ExcelProperty("主材料克重")
  @DecimalString(message = "主材料克重小数格式不正确", label = "主材料克重")
  private String gramWeight;

  /** 工费 */
  @ExcelProperty("工费")
  @DecimalString(message = "工费小数格式不正确", label = "工费")
  private String laborCosts;

  /** 库存数量 */
  @ExcelProperty("库存数量")
  @IntegerString(
    message = "库存数量数值格式不正确",
    label = "库存数量",
    min = 0
  )
  private String storageBinNum;

  /** 应收金额 */
  @ExcelProperty("应收金额")
  @DecimalString(message = "应收金额小数格式不正确", label = "应收金额")
  private String amount;
}
